package com.my.hzb.order.ctrl;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.my.hzb.pro.service.ProductService;
import com.my.hzb.user.service.AddressService;

@Controller
public class HomeCtrl {

	@RequestMapping("/toAddOrder")
	public String toAddOrder(HttpServletRequest request,HttpServletResponse response,String coo,Integer proId)
	{
		response.addCookie(new Cookie("hzb",coo));
		request.setAttribute("proId", proId);
		return "/order/toAddOrder";
	}
	@RequestMapping("/subOrder")
	public String subOrder(HttpServletRequest request,String orderNo){
		request.setAttribute("orderNo", orderNo);
		return "/order/subOrder";
	}
	
}
